<?php
/*
 * Using HTML helper!!!
 */
?>
<div id="servitius_content" >
    <h2>Article edit</h2>

    <?php
    $attributes = array('class' => 'editor', 'id' => 'article_editor');
    // megnézzük új article-hez kell e a form form-e vagy már melévőt frissítünk.
    if (isset($article->id)):
        echo form_open('admin/articles/update', $attributes);
        ?>
        <input type="hidden" name="id" value="<?php echo $article->id; ?>" />
        <?php
    else:
        echo form_open('admin/articles/add_new', $attributes);
    endif;
    ?>
    <label style="font-size: 15px;" for="title">Title</label><br />
    <input id="title" type="text" name="title" value="<?php if (isset($article->title))
        echo $article->title; ?>" /><br/>
    <br/>

    <label style="font-size: 15px;" for="text">Text</label><br />
    <textarea name="text" class="ckeditor"><?php if (isset($article->text))
               echo $article->text; ?></textarea>

    <p style="text-align: center;"><input type="submit" name="submit" id="submit" value="Submit" /></p>

</form>
</div>
